<?php
// +----------------------------------------------------------------------
// | 中联致远服务端框架
// +----------------------------------------------------------------------
// | Copyright (c) 2018 http://www.zhongliansoft.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: tony <tanyu@zhongliansoft.com>
// +----------------------------------------------------------------------

namespace app\Manage\controller;

use app\common\controller\Manage;
use app\common\model\DeviceLog as DeviceLogModel;
use think\facade\Request;

class DeviceLog extends Manage
{
    /**
     * @return mixed
     * @throws \think\exception\DbException
     */
    public function index()
    {
        if(Request::isAjax())
        {
            $DeviceLogModel = new DeviceLogModel();
            return $DeviceLogModel->tableData(input('param.'));
        } else {
            if(input('param.')['bill_id']) {
                $this->assign('bill_id', input('param.')['bill_id']);
            }

            //订单来源
            $status = config('params.device')['log_status'];
            $this->assign('status', $status);
            return $this->fetch();
        }
    }
}